package com.cangshi.service;

import com.cangshi.dao.TaskConditionMapper;
import com.cangshi.entity.TaskCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by 15c on 2017/4/10.
 */
@Service("TaskConditionBean")
public class TaskConditionServiceImpl implements TaskConditionService {
    @Autowired
    TaskConditionMapper taskConditionMapper;
    @Override
    public int insertTaskCondition(TaskCondition taskTaskId) {
        return taskConditionMapper.insertSelective(taskTaskId);
    }

    /**
     * 删除任务时也将删除任务条件
     * @param taskTaskId
     * @return
     */
    @Override
    public int delete(Integer taskTaskId) {
        return taskConditionMapper.deleteByPrimaryKey(taskTaskId);
    }
}
